package com.lc.projects.unit.socket.rmi;

import java.net.MalformedURLException;
import java.rmi.AlreadyBoundException;
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;

public class Server {
	public static void main(String[] args) {
		try {
			SumInterface sum = new SumImpl();
			LocateRegistry.createRegistry(8088);
			Naming.bind("rmi://127.0.0.1:8088/server", sum);
			System.out.println("Regist obj done.");
		} catch (RemoteException | MalformedURLException | AlreadyBoundException e) {
			e.printStackTrace();
		}
		
	}
}
